package com.nifostasky.comic.vos;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ResultCode {

    /*成功状态码*/
    SUCCESS(200,"成功"),
    FAIL(-1,"失败"),

    /*前后端数据交互出现错误*/
    JSON_PARSE_ERROR(400,"传递的json数据格式错误"),

    /*参数错误 -10001 至 -19999*/
    PARAM_IS_INVALID(-10001,"参数无效"),

    /*用户错误 -20001 至 -29999*/
    USER_NOT_LOGGED_ID(-20001,"用户未登录"),
    USER_LOGIN_ERROR(-20002,"用户不存在或密码错误"),
    USER_ACCOUNT_FORBIDDEN(-20003,"账号已被禁用"),
    USER_NOT_EXIST(-20004,"用户不存在"),
    USER_HAS_EXISTED(-20005,"用户名已存在"),
    USER_CHECK_CODE_ERROR(-20006,"验证码错误"),
    LOGIN_ERROR(-20007,"登录异常"),
    LOGIN_OUT_ERROR(-20012,"登录退出异常"),
    USER_DELETED(-20008,"用户已删除"),
    TOEKN_PARSE_ERROR(-20009,"token解析异常"),
    TOEKN_NOT_EXIST(-20010,"token不能为空"),
    CLOUD_USER_INVALID_TOKEN(701,"token无效"),
    USER_TYPE_NOT_EXIST(-20011,"用户类型不存在"),
    CHECK_CODE_EXCEPTION(-21008,"获取验证码异常"),
    TWO_PWD_DIFFERENT(-22001,"两次输入的密码不一致"),
    OLD_NEW_PWD_EQUALLY(-22002,"新旧密码一样"),
    CURRENT_USER_NOT_UPDATE(-22003,"非当前用户不能修改密码"),
    OLD_PWD_ERROR(-22004,"原密码不正确"),
    ROLE_HAS_EXISTED(-23001,"角色名称已存在"),
    /*权限*/
    NOT_MATCH_AUTHORITY(-24001,"权限不匹配"),
    USER_NOT_CURRENT_AUTHORITY(-24002,"当前用户不具备该权限"),
    USER_NOT_AUTHORITY(-24003,"当前用户没有权限"),
    USER_NOT_TOKEN(-24004,"当前用户登录信息异常，无权操作"),

    DATA_EXIST(-30503,"数据已经在"),
    DATA_NOT_EXIST(-30504,"数据不存在"),
    NAME_NOT_REPEAT(-30505,"名称不能重复"),


    /*系统错误code -40001 至 -49999*/
    SYSTEM_INNER_ERROR(-40001,"系统繁忙，请稍后重试"),
    SYSTEM_SERVER_ERROR(500,"服务器内部错误"),

   /*接口错误code -60001 至 -69999*/

    /*权限错误code -70001 至 -79999*/
    PERMISSION_NO_ACCESS(-70001,"无访问权限"),
    CLOUD_USER_LOGGED(705,"当前用户已登录"),
    REQUIRED_PARAMS(5001,"缺少必填参数"),
    DICT_DOMAIN_CODE_EXIST(-1001,"编码已存在"),
    DICT_DOMAIN_VALUE_EXIST(-1002,"同一字典大类下，已存在当前字典值"),
    MENU_CODE_EXIST(-1003,"菜单编码已存在"),
    SYS_CHILD_EXIST(-1101,"存在子集不能此操作"),
    ;



    private Integer code;

    private String msg;

    public Integer code (){
        return this.code;
    }

    public String msg (){
        return this.msg;
    }

}